/*eslint-disable*/
// 选择题

const router = require("koa-router")()

const { questionApi } = require("../../../controller/question/question")

const { check } = require("../../../middleware/routercheck")

const { veri } = require("../../../middleware/checkData")

// const {xxs} = require('../../../middleware/xxs')


router.get(
    "/question/byid/:id",
    veri(["id"], "Non empty", "params"),
    check("getquestion"),
    questionApi)
router.get(
    "/question/list",
    veri(["pageNum", "pageSize"], "Non empty", "query"),
    check("getquestion"),
    questionApi)
router.post(
    "/question/add",
    veri(["title", "chapter_id", "type_id", "answer", "difficulty", 'analysis', 'catalouge_id'], "Non empty", "request"),
    check("createquestion"),
    questionApi)
router.put(
    "/question/edit/:id",
    veri(["id"], "Non empty", "params"),
    check("editquestion"),
    questionApi)
router.delete(
    "/question/remove/:id",
    veri(["id"], "Non empty", "params"),
    check("removequestion"),
    questionApi)


module.exports = router

